<% import grails.persistence.Event %>
<%=packageName%>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="\${message(code: '${domainClass.propertyName}.label', default: '${className}')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>

	<style>
		.invertedshiftdown2{
                            //padding: 0;
                            padding:2em;
                            width: 100%;
                            //border-top: 5px solid #D10000; /*Highlight red color theme*/
                            background: transparent;
                            voice-family: "\"}\"";
                            voice-family: inherit;
                            }

                            .invertedshiftdown2 ul{
                            margin:0;
                            margin-left: 30px; /*margin between first menu item and left browser edge*/
                            padding: 0;
                            list-style: none;
                            }

                            .invertedshiftdown2 li{
                            //display: inline;
                            margin: 0 2px 0 0;
                            padding: 0;
                            //text-transform:uppercase;
                            }

                            .invertedshiftdown2 a{
                            float: left;
                            display: block;
                            font: 16px "HelveticaNeue-Light";
                            color: black;
                            text-decoration: none;
                            margin: 0 1px 0 0; /*Margin between each menu item*/
                            padding: 5px 10px 5px 2px; /*Padding within each menu item*/
                            background-color: lightblue; /*Default menu color*/
                            border-bottom: 4px solid white;
                            }

                            .invertedshiftdown2 a:hover{
                            background-color: #beae78; /*Highlight red color theme*/
                            padding-top: 10px; /*Set padding-top value to default's padding-top + padding-bottom */
                            padding-bottom: 0; /*Set padding-bottom value to 0 */
                            border-bottom-color: lightblue; /*Highlight red color theme*/
                            color: white;
                            }

                            .invertedshiftdown2 .current a{ /** currently selected menu item **/
                            background-color: #beae78; /*Highlight red color theme*/
                            padding-top: 10px; /*Set padding-top value to default's padding-top + padding-bottom */
                            padding-bottom: 0; /*Set padding-bottom value to 0 */
                            border-bottom-color: lightblue; /*Highlight red color theme*/
                            color: black;
                            }
	</style>

	</head>
	<body>
		<a href="#show-${domainClass.propertyName}" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="invertedshiftdown2">
			<ul>
				<li><a class="home" href="\${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<!-- <li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li> -->
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
				<li><a href="http://localhost:9090/BloomersSeeds2340/userHome/userHome" title="Revised">Account Home</a></li>
							</ul>
		</div>
		<div id="show-${domainClass.propertyName}" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="\${flash.message}">
			<div class="message" role="status">\${flash.message}</div>
			</g:if>
			<ol class="property-list ${domainClass.propertyName}">
			<%  excludedProps = Event.allEvents.toList() << 'id' << 'version'
				allowedNames = domainClass.persistentProperties*.name << 'dateCreated' << 'lastUpdated'
				props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) }
				Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[]))
				props.each { p -> %>
				<g:if test="\${${propertyName}?.${p.name}}">
				<li class="fieldcontain">
					<span id="${p.name}-label" class="property-label"><g:message code="${domainClass.propertyName}.${p.name}.label" default="${p.naturalName}" /></span>
					<%  if (p.isEnum()) { %>
						<span class="property-value" aria-labelledby="${p.name}-label"><g:fieldValue bean="\${${propertyName}}" field="${p.name}"/></span>
					<%  } else if (p.oneToMany || p.manyToMany) { %>
						<g:each in="\${${propertyName}.${p.name}}" var="${p.name[0]}">
						<span class="property-value" aria-labelledby="${p.name}-label"><g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${p.name[0]}.id}">\${${p.name[0]}?.encodeAsHTML()}</g:link></span>
						</g:each>
					<%  } else if (p.manyToOne || p.oneToOne) { %>
						<span class="property-value" aria-labelledby="${p.name}-label"><g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${propertyName}?.${p.name}?.id}">\${${propertyName}?.${p.name}?.encodeAsHTML()}</g:link></span>
					<%  } else if (p.type == Boolean || p.type == boolean) { %>
						<span class="property-value" aria-labelledby="${p.name}-label"><g:formatBoolean boolean="\${${propertyName}?.${p.name}}" /></span>
					<%  } else if (p.type == Date || p.type == java.sql.Date || p.type == java.sql.Time || p.type == Calendar) { %>
						<span class="property-value" aria-labelledby="${p.name}-label"><g:formatDate date="\${${propertyName}?.${p.name}}" /></span>
					<%  } else if(!p.type.isArray()) { %>
						<span class="property-value" aria-labelledby="${p.name}-label"><g:fieldValue bean="\${${propertyName}}" field="${p.name}"/></span>
					<%  } %>
				</li>
				</g:if>
			<%  } %>
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="\${${propertyName}?.id}" />
					<g:link class="edit" action="edit" id="\${${propertyName}?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="\${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('\${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
